package laba1.task2;

import static laba1.task2.Perimeter.perimeter;

/**
 *
 * @author yakimovich
 */
public class FigureTestttttttttttt {

    /**
     *
     * @param args
     */
    public static void main(String[] args) {
        Point p1 = new Point(0, 0);
        Point p2 = new Point(0, 1);
        Point p3 = new Point(1, 1);
        Point p4 = new Point(1, 0);

        Figure t = new Tetragon(p1, p2, p3, p4);
        Figure tr = new Triangle(p1, p2, null);

        System.out.println(tr.getClass().getSimpleName());

        t.draw();
//        t.scale(2);
//        t.draw();
//        t.move(-1, 1);
//        t.draw();

        tr.draw();
//        tr.scale(2);
//        tr.draw();
//        tr.move(-1, 1);
//        tr.draw();

        if (perimeter(tr) == -1) {
            System.out.println("Perimeter is not found");
        } else {
            System.out.println("Perimeter: " + perimeter(tr));
        }
        System.out.println();

        System.out.println("Perimeter: " + perimeter(t));
        System.out.println();

        System.out.println("Perimeter: " + perimeter(tr));
        System.out.println();
    }
}
